import request from '@/utils/request'
/**
 * 获取员工列表
 * @returns
 */
export const getEmpListApi = (page, size) => {
  return request({
    url: '/sys/user',
    params: {
      page,
      size
    }
  })
}
/**
 * 删除员工功能
 * @param {*} id 员工id
 * @returns
 */
export const delEmployeesListApi = (id) => {
  return request({
    url: `/sys/user/${id}`,
    method: 'DELETE'
  })
}
/**
 * 添加员工
 * @param {*} data 员工数据
 * @returns
 */
export const addEmployeesUserApi = (data) => {
  return request({
    url: '/sys/user',
    method: 'POST',
    data
  })
}
/**
 * 批量导入员工信息
 * @param {*} list 员工信息列表
 * @returns
 */
export const addUserListApi = list => {
  return request({
    url: '/sys/user/batch',
    method: 'POST',
    data: list
  })
}
/**
 * 修改员工信息接口
 * @param {*} data 员工基本数据
 * @returns
 */
export const editEmployeesApi = data => {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'PUT',
    data
  })
}
